package cn.com.test;

import org.activiti.engine.ProcessEngine;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/applicationContext-bean.xml","/activiti.cfg.xml","/mybatis.xml"})
public class test {
     
    @Test
    public void test(){
//    	  System.out.println("启用流程实例");  
//    	    RuntimeService runtimeService = processEngine.getRuntimeService();  
//    	    System.out.println("流程已经可以应用");  
//    	    ProcessInstance instance = runtimeService  
//    	            .startProcessInstanceByKey("1");  
//    	    System.out.println("已返回流程实例instance,id为:" + instance.getId());  
//    	    System.out.println("获取instance：" + instance);  
//    	    System.out.println("获取instance_id：" + instance.getId());  
//    	    System.out.println("获取instance_ProcessDefinitionId："  
//    	            + instance.getProcessDefinitionId());  
//    	    System.out.println("获取instance_ProcessInstanceId："  
//    	            + instance.getProcessInstanceId());  
//    	    System.out.println("获取instance_BusinessKey：" + instance.getBusinessKey());  
    	  
    }
}
